import { translateTitle } from '@/utils/i18n'
const DataSourceConfig = {
  DataSourceConfig: {
    search: {
      form: {
        method: 'dams.data.source.conf.query',
        name: 'search',
        field: [
          {
            type: 'input',
            name: 'DATA_SOURCE_ID',
            label: translateTitle('Dams.DamsSystemManagement.数据源ID'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'DB_TYPE',
            label: translateTitle('Dams.DamsSystemManagement.数据库类型'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'DB_VERSION',
            label: translateTitle('Dams.DamsSystemManagement.数据库版本'),
            labelHidden: false,
          },
          {
            type: 'button',
            label: translateTitle('Dams.DamsSystemManagement.查询'),
            labelHidden: true,
          },
        ],
      },
    },
    dialog: {
      form: {
        api: '',
        name: 'dialog',
        field: [
          {
            type: 'input',
            name: 'DATA_SOURCE_ID',
            label: translateTitle('Dams.DamsSystemManagement.数据源ID'),
            isRules: true,
          },
          {
            type: 'input',
            name: 'DATA_SOURCE_ADDR',
            label: translateTitle('Dams.DamsSystemManagement.数据源URL'),
            isRules: true,
          },
          {
            type: 'numInput',
            name: 'POOL_MAX_NUM',
            label: translateTitle('Dams.DamsSystemManagement.数据源连接池最大连接数'),
            isRules: true,
          },
          {
            type: 'input',
            name: 'DB_VERSION',
            label: translateTitle('Dams.DamsSystemManagement.数据库版本'),
            isRules: true,
          },
          {
            type: 'select',
            name: 'DB_ROLE',
            label: translateTitle('Dams.DamsSystemManagement.数据库角色'),
            isRules: true,
          },
          {
            type: 'select',
            name: 'DB_TYPE',
            label: translateTitle('Dams.DamsSystemManagement.数据库类型'),
            isRules: true,
          },
          {
            type: 'input',
            name: 'DB_NAME',
            label: translateTitle('Dams.DamsSystemManagement.数据库名称'),
            isRules: true,
          },
          {
            type: 'switch',
            name: 'ENABLE_MASTER_SLAVE',
            label: translateTitle('Dams.DamsSystemManagement.是否开启主从模式'),
            activeValue: 'Y',
            inactiveValue: 'N',
            value: 'Y',
          },
          {
            type: 'switch',
            name: 'ACTIVE',
            label: translateTitle('Dams.DamsSystemManagement.是否启用'),
            activeValue: 'Y',
            inactiveValue: 'N',
            value: 'Y',
          },
          {
            type: 'input',
            name: 'DB_USER',
            label: translateTitle('Dams.DamsSystemManagement.用户名'),
            isRules: true,
          },
          {
            type: 'input',
            name: 'DB_PASS',
            label: translateTitle('Dams.DamsSystemManagement.密码'),
            isRules: true,
          },
          {
            type: 'input',
            name: 'DATA_SOURCE_DESCR',
            label: translateTitle('Dams.DamsSystemManagement.数据源描述'),
            isRules: true,
          },
          {
            type: 'input',
            name: 'URL_PARAMS',
            label: translateTitle('Dams.DamsSystemManagement.URL参数'),
          },
          {
            type: 'input',
            name: 'ADDWHO',
            label: translateTitle('Dams.DamsSystemManagement.新增人'),
            hidden: true,
            value: '',
          },

          {
            type: 'input',
            name: 'ADDTIME',
            label: translateTitle('Dams.DamsSystemManagement.新增时间'),
            hidden: true,
            value: '',
          },
          {
            type: 'input',
            name: 'EDITWHO',
            label: translateTitle('Dams.DamsSystemManagement.修改人'),
            hidden: true,
            value: '',
          },

          {
            type: 'input',
            name: 'EDITTIME',
            label: translateTitle('Dams.DamsSystemManagement.修改时间'),
            hidden: true,
            value: '',
          },
          {
            type: 'button',
            label: translateTitle('Dams.DamsSystemManagement.提交'),
            labelHidden: true,
          },
        ],
      },
    },
    addMethod: 'dams.data.source.conf.add',
    deleteMethod: 'dams.data.source.conf.delete',
    updateMethod: 'dams.data.source.conf.update',
  },
}
export default DataSourceConfig
